//
//  BCNavBarVC.m
//  BaoYouYou
//
//  Created by caobo56 on 2016/12/4.
//  Copyright © 2016年 caobo56. All rights reserved.
//

#import "BCNavBarVC.h"
#import "Live-Header.h"
#import "UIImage+Color.h"
@interface BCNavBarVC ()

@end

@implementation BCNavBarVC

- (void)viewDidLoad {
    [super viewDidLoad];
    [self setNavigationControllerAppearance];

    // Do any additional setup after loading the view.
}

-(void)viewWillAppear:(BOOL)animated{
    [super viewWillAppear:animated];
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (void)setNavigationControllerAppearance {
    [UINavigationBar appearance].barStyle  = UIBarStyleDefault;
    UIImage * image = [UIImage createImageWithColor:DEFAULTREDCOLOR andSize:CGSizeMake(SCREEN_WIDTHL, 64)];
    [self.navigationBar setBackgroundImage:image forBarMetrics:UIBarMetricsDefault];
    self.view.backgroundColor = [UIColor whiteColor];
    [self.navigationBar setTintColor:[UIColor whiteColor]];

    [[UINavigationBar appearance] setTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor whiteColor]}];
    
    //    //自定义返回按钮
    [UINavigationBar appearance].backIndicatorTransitionMaskImage = [UIImage imageNamed:@"back"];
    [UINavigationBar appearance].backIndicatorImage = [UIImage imageNamed:@"back"];
    [[UIBarButtonItem appearance] setBackButtonTitlePositionAdjustment:UIOffsetMake(0, -100) forBarMetrics:UIBarMetricsDefault];
}


@end
